package com.well.kernel.spring.web.easyui;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Copyright &copy; Well All rights reserved.
 * Author:Well
 * Date:2018-08-27
 * Description:
 */

public class Combobox extends ArrayList<Map<String,String>> implements Serializable{

    public Combobox(){}

    public void add(String value,String text){
        Map<String,String> map=new HashMap<>();
        map.put("value",value);
        map.put("text",text);
        super.add(map);
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }

}
